﻿using System;
using ml_test_google_trans.Google.Translates.WebService;


namespace ml_test_google_trans.Translate
{
    public partial class SimpleTransByWebService : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
        }

        protected void Translates_Click(object sender, EventArgs e)
        {
            DateTime startDate = DateTime.Now;
            
            var reVal =
                new DoTranslates().TranslateTheLongSentence(txtSrc.Text, ddlTo.SelectedValue);
            txtTrg.Text = Server.HtmlDecode(reVal.TargetText);
            lblMsg.Text = "Uses Time : [" + (DateTime.Now - startDate).TotalMilliseconds + "]ms";
        }
    }
}
